#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""

"""

__author__ = 'Chris'
__email__ = 'themaluyao@outlook.com'
__gitee__ = 'https://gitee.com/luyaoCode'
__since__ = '2022/4/4 0:15'

# 注意这里在安装时，可能需要手动安装 hydra-core
import hydra
from omegaconf import DictConfig

from pythonarchetype import PythonArchetype
from pythonarchetype.middleware.LoguruAdapter import LoguruAdapter
from pythonarchetype.overall.ProjectPath import project_path

logger = LoguruAdapter()


@hydra.main(config_path=project_path.root_path + "/conf", config_name="config")
def app(cfg: DictConfig):
    global logger
    logger = logger.config(cfg)
    python_archetype = PythonArchetype.PythonArchetype(cfg, logger)
    python_archetype.run()


if __name__ == "__main__":
    app()
